package com.ocm.user.dto;

import lombok.Data;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import static com.ocm.core.launch.constant.TokenConstant.USER_TENANT;

/**
 * Author:   hqy
 * Date:     29/12/2021 12:42 PM
 * Description:用于新用户注册
 */
@Data
public class UserRegisterDTO {

	@Size(min=6, max=12,message = "用户名最小6位，最大12位")
	private String account;

	@Size(min=6, max=12,message = "密码最小6位，最大12位")
	private String password;

	@Pattern(regexp = "^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\\d{8}$",message = "手机号格式错误")
	private String phone;

	private String tenantId = USER_TENANT;

	private String roleId = "1460913091494662145";

}
